/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dto;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author duonghung1369
 */
public class Category implements java.io.Serializable {

    private int id;
    private String name;
    private int parent_id;
    private Category parent_category;
    private List<Category> child_categories;

    public Category() {
    }

    public Category(int id, String name) {
        this.id = id;
        this.name = name;
        child_categories = new ArrayList<Category>();
    }

    /**
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the parent_category
     */
    public Category getParent_category() {
        return parent_category;
    }

    /**
     * @param parent_category the parent_category to set
     */
    public void setParent_category(Category parent_category) {
        this.parent_category = parent_category;
    }

    /**
     * @return the child_categories
     */
    public List<Category> getChild_categories() {
        return child_categories;
    }

    /**
     * @param child_categories the child_categories to set
     */
    public void setChild_categories(List<Category> child_categories) {
        this.setChild_categories(child_categories);
    }

    /**
     * @return the parent_id
     */
    public int getParent_id() {
        return parent_id;
    }

    /**
     * @param parent_id the parent_id to set
     */
    public void setParent_id(int parent_id) {
        this.parent_id = parent_id;
    }
}
